home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
7_5.lha
/
7_5
/
7_5a1_rect.c
< prev
next >
Wrap
Text File
|
1993-08-08
|
513b
|
21 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ Exercise 7.5
/ rectangle derived from a line
lass rectangle : public line
ublic:
point north() { return point((w.x+e.x)/2,e.y); }
point east();
point south() { return point((w.x+e.x)/2,w.y); }
point west();
point neast() { return e; }
point seast();
point swest() { return w; }
point nwest();
void draw();
rectangle(point a, point b);
;